#ifndef DEFAULTSHADER
#define DEFAULTSHADER

#include "Vector3.h"
#include "SurfaceShader.h"
#include <iostream>

using namespace std;

class DefaultShader : public SurfaceShader {
    public:
        DefaultShader() { color = new Vector3(1.0, 0.0, 0.0); }
        bool Validate() { return true; }
        void InternalShade(Material &_Material,
                            Ray &_EyeRay,
                            Vector3 &_HitLocation,
                            SurfaceObject &_Object,
                            vector<LightSource*> &_ListOfLightSources,
                            RenderingSystem &_RenderingSystem) { _ColorOut = *color; }

        Vector3 Shade(Material &_Material,
                            Ray &_EyeRay,
                            Vector3 &_HitLocation,
                            SurfaceObject &_Object,
                            vector<LightSource*> &_ListOfLightSources,
                            RenderingSystem &_RenderingSystem) {
            if ( Validate() )
            {
                InternalShade(_Material, _EyeRay, _HitLocation, _Object, _ListOfLightSources, _RenderingSystem);
                return _ColorOut;
            }
            return Vector3(0.0, 0.0, 1.0);
        }

    private:
        Vector3 * color;
};

#endif

